



* THREAT ASSESSMENT MODELS

clear
set more off
		use "Flynn Fordham II Replication Data Main Models.dta"


* TABLE 1 -- MAIN MODELS 1-6
* Base Model Without Party Variable	
	* Negative Evaluations 
	* Model 1
	set more off
	eststo clear
	eststo: nbreg hosteval mfgwt cong_dummy2-cong_dummy12, robust
	* Positive Evaluations 
	* Model 2
	eststo: nbreg faveval mfgwt cong_dummy2-cong_dummy12, robust
* Including Republican, College, and Officer varaibles
	* Negative Evaluations
	* Model 1
	eststo: nbreg hosteval republican mfgwt college officer cong_dummy2-cong_dummy12, robust
	*Positive Evaluations
	* Model 2
	eststo: nbreg faveval republican mfgwt college officer cong_dummy2-cong_dummy12, robust	
* Including Coastal Dummy Variable, Senate variable, and Delegation size
	* Negative Evaluations
	* Model 1
	eststo: nbreg hosteval republican mfgwt college officer coastal shipshr Senate delegation cong_dummy2-cong_dummy12, robust
	*Positive Evaluations
	* Model 2
	eststo: nbreg faveval republican mfgwt college officer coastal shipshr Senate delegation cong_dummy2-cong_dummy12, robust

	esttab _all using Table_1.rtf, se nogaps star(* 0.10 ** 0.05 *** 0.01) ///
	obslast compress drop(cong_dummy*) label mtitles("Negative Evaluations" "Positive Evaluations" "Negative Evaluations" "Positive Evaluations" "Negative Evaluations" "Positive Evaluations") ///
	addnote("Note: Fixed effects for individuals congresses not shown.") ///
	title(Negative Binomial Models Predicting Legislator Evaluations of the International Environment) ///
	modelwidth(8)  order(mfgwt republican college officer coastal shipshr) replace

	

* BIC Comparisons across models

	nbreg hosteval  mfgwt cong_dummy2-cong_dummy12
	estimates store base	
	estat ic
	nbreg hosteval republican mfgwt college officer coastal shipshr Senate delegation cong_dummy2-cong_dummy12
	estimates store full
	estat ic
	nbreg hosteval republican mfgwt college officer cong_dummy2-cong_dummy12
	estimate store original
	estat ic
	lrtest base original, stats
	lrtest original full, stats
	
	nbreg faveval  mfgwt cong_dummy2-cong_dummy12
	estimates store base	
	estat ic
	nbreg faveval republican mfgwt college officer coastal shipshr Senate delegation cong_dummy2-cong_dummy12
	estimates store full
	estat ic
	nbreg faveval republican mfgwt college officer cong_dummy2-cong_dummy12
	estimate store original
	estat ic
	lrtest base original, stats
	lrtest original full, stats
	
	
	
	
* APPENDIX TABLE -- ROBUSTNESS CHECKS
* Split Sample Models
* House
* Negative Evaluations 
	* Model 1
	set more off
	eststo clear
	eststo: nbreg hosteval mfgwt republican college officer cong_dummy2-cong_dummy12 if Senate==0, robust
	* Positive Evaluations 
	* Model 2
	eststo: nbreg faveval mfgwt republican college officer cong_dummy2-cong_dummy12 if Senate == 0, robust
* Senate
* Negative Evaluations 
	* Model 1
	eststo: nbreg hosteval mfgwt republican college officer cong_dummy2-cong_dummy12 if Senate==1, robust
	* Positive Evaluations 
	* Model 2
	eststo: nbreg faveval mfgwt republican college officer cong_dummy2-cong_dummy12 if Senate == 1, robust

	esttab _all using Table_A2.rtf, se nogaps star(* 0.10 ** 0.05 *** 0.01) ///
	obslast drop(cong_dummy*) label mtitles("Negative Evaluations" "Positive Evaluations" "Negative Evaluations" "Positive Evaluations") ///
	addnote("Note: Fixed effects for individuals congresses not shown.") ///
	title(Negative Binomial Models Predicting Legislator Evaluations of the International Environment) ///
	modelwidth(8)  order(mfgwt republican college officer) replace




* APPENDIX TABLE -- ROBUSTNESS CHECKS
	* Negative Evaluations 
	* Model 1
	set more off
	eststo clear
	eststo: nbreg hosteval mfgwt dwnom1 college officer cong_dummy2-cong_dummy12, robust
	* Positive Evaluations 
	* Model 2
	eststo: nbreg faveval mfgwt dwnom1 college officer cong_dummy2-cong_dummy12, robust
* Including Coastal Dummy Variable, Senate variable, and Delegation size
	* Negative Evaluations
	* Model 1
	eststo: nbreg hosteval dwnom1 mfgwt college officer coastal shipshr Senate delegation cong_dummy2-cong_dummy12, robust
	*Positive Evaluations
	* Model 2
	eststo: nbreg faveval dwnom1 mfgwt college officer coastal shipshr Senate delegation cong_dummy2-cong_dummy12, robust

	esttab _all using Table_A3.rtf, se nogaps star(* 0.10 ** 0.05 *** 0.01) ///
	obslast drop(cong_dummy*) label mtitles("Negative Evaluations" "Positive Evaluations" "Negative Evaluations" "Positive Evaluations") ///
	addnote("Note: Fixed effects for individuals congresses not shown.") ///
	title(Negative Binomial Models Predicting Legislator Evaluations of the International Environment) ///
	modelwidth(8)  order(mfgwt dwnom1 college officer coastal shipshr) replace
	
	
	
* APPENDIX TABLE FOR STATE LEVEL ROBUSTNESS CHECKS	
	clear
		set more off
		use "Flynn Fordham II Replication Data Main Models.dta"
		
		collapse (sum) faveval hosteval (mean) mfgwt republican college officer	cong_dummy*, by(state congress)
			label var mfgwt "Manufacturing"
			label var republican "Republican"
			label var college "College"
			label var officer "Officer"
	
		eststo clear
	
	* Negative Evaluations
		eststo: nbreg hosteval mfgwt republican college officer cong_dummy2-cong_dummy12, robust 
	* Positive Evaluations
		eststo: nbreg faveval mfgwt republican college officer cong_dummy2-cong_dummy12, robust

		esttab _all using Table_A4.rtf, se nogaps star(* 0.10 ** 0.05 *** 0.01) ///
		obslast drop(cong_dummy*) label mtitles("Negative Evaluations" "Positive Evaluations") ///
		addnote("Note: Fixed effects for individuals congresses not shown.") ///
		title(Negative Binomial Models Predicting Legislator Evaluations of the International Environment) ///
		modelwidth(8)  order(mfgwt republican college officer) replace

		
* APPENDIX TABLE ROBUSTNESS CHECKS FOR LEGISLATOR TENURE		
	clear
		set more off
		use "Flynn Fordham II Replication Data Main Models.dta"
		
		*Negative Evaluations
		eststo: nbreg hosteval mfgwt republican college officer tenure cong_dummy2-cong_dummy12, robust 
		* Positive Evaluations
		eststo: nbreg faveval mfgwt republican college officer tenure cong_dummy2-cong_dummy12, robust

		esttab _all using Table_A5.rtf, se nogaps star(* 0.10 ** 0.05 *** 0.01) ///
		obslast drop(cong_dummy*) label mtitles("Negative Evaluations" "Positive Evaluations") ///
		addnote("Note: Fixed effects for individuals congresses not shown.") ///
		title("Negative Binomial Models Predicting Legislator Evaluations of the International Environment. Legislat") ///
		modelwidth(8)  order(mfgwt republican college officer tenure) replace
		
		
* APPENDIX TABLE ROBUSTNESS CHECKS FOR PROTECTIONIST AGRICULTURE		
	clear
		set more off
		use "Flynn Fordham II Replication Data Main Models.dta"
		label var swrshare "Sugar, Wool, and Rice"
		
		* Base Model Without Party Variable	
		* Negative Evaluations 
		* Model 1
		set more off
		eststo clear
		eststo: nbreg hosteval mfgwt swrshare cong_dummy2-cong_dummy12, robust
		* Positive Evaluations 
		* Model 2
		eststo: nbreg faveval mfgwt swrshare cong_dummy2-cong_dummy12, robust
		* Including Republican, College, and Officer varaibles
		* Negative Evaluations
		* Model 1
		eststo: nbreg hosteval republican mfgwt swrshare college officer cong_dummy2-cong_dummy12, robust
		*Positive Evaluations
		* Model 2
		eststo: nbreg faveval republican mfgwt swrshare college officer cong_dummy2-cong_dummy12, robust	
		* Including Coastal Dummy Variable, Senate variable, and Delegation size
		* Negative Evaluations
		* Model 1
		eststo: nbreg hosteval republican mfgwt swrshare college officer coastal shipshr Senate delegation cong_dummy2-cong_dummy12, robust
		*Positive Evaluations
		* Model 2
		eststo: nbreg faveval republican mfgwt swrshare college officer coastal shipshr Senate delegation cong_dummy2-cong_dummy12, robust

		esttab _all using Table_A6.rtf, se nogaps star(* 0.10 ** 0.05 *** 0.01) ///
		obslast compress drop(cong_dummy*) label mtitles("Negative Evaluations" "Positive Evaluations" "Negative Evaluations" "Positive Evaluations" "Negative Evaluations" "Positive Evaluations") ///
		addnote("Note: Fixed effects for individuals congresses not shown.") ///
		title(Negative Binomial Models Predicting Legislator Evaluations of the International Environment) ///
		modelwidth(8)  order(mfgwt swrshare republican college officer coastal shipshr) replace

		
* APPENDIX TABLE FOR REPUBLICAN ELECTION MODELS s

	clear
		set more off
		use "Flynn Fordham II Replication Data Election Model.dta"

	probit republican mfgwt south cong_dummy2-cong_dummy12 if attain==1, robust

		esttab _all using Table_election.rtf, se nogaps star(* 0.10 ** 0.05 *** 0.01) ///
			obslast compress drop(cong_dummy*) label ///
			addnote("Note: Fixed effects for individuals congresses not shown.") ///
			title("Probit Model Predicting Republican Representative") ///
			order(mfgwt republican south) replace

			* Predictions at 25th, 75th, and 99th percentiles.
			margins, at(mfgwt=(.125 .324 .46))  
		
		


